<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>

<apes-content>
  <apes-card [apesBordered]="false">
    <div class="boxShowFlex">
      <!-- 日期 -->
      <div apes-col apesSpan="8">
        <div>
          <span>日期：</span>
          <div class="boxDiv">
            <apes-range-picker [(ngModel)]='timeList' [apesFormat]="'yyyy-MM-dd'"></apes-range-picker>
          </div>
        </div>
        <p [ngStyle]="{ display: hind }"><i class="anticon anticon-exclamation-circle-o"></i> 必填！最大时间为一天 </p>
      </div>
      <!-- 销售组 -->
      <div apes-col apesSpan="8">
        <span>销售组：</span>
        <ng-select style="width: 240px; display: inline-block"
                   typeToSearchText
                   [items]="sale"
                   multiple="true"
                   bindLabel="XSZMC"
                   bindValue="XSZID"
                   placeholder="选填，可多选"
                   [(ngModel)]="saleID"
                   [notFoundText]="'无法找到'">
        </ng-select>
      </div>

      <div apes-col apesSpan="8">
        <span>公司：</span>
        <ng-select style="width: 240px; display: inline-block;"
                   typeToSearchText
                   [items]="companyData"
                   multiple="true"
                   bindLabel="name"
                   bindValue="id"
                   placeholder="选填，可多选"
                   [(ngModel)]="companyList"
                   [notFoundText]="'无法找到'">
        </ng-select>
      </div>
    </div>
    <!-- table -->
    <apes-card>
      <ag-grid-angular #grid
                       style="width: 100%;" [ngStyle]="{ height: height }" class="ag-theme-balham"
                       enableColResize="true"
                       enableSorting="true"
                       enableFilter="true"

                       suppressLoadingOverlay="true"

                       [rowData]="rowData"
                       [gridOptions]="gridOptions"
                       [columnDefs]="columnDefs"
                       [pinnedBottomRowData]="pinnedBottomRowData">
      </ag-grid-angular>
    </apes-card>
  </apes-card>
</apes-content>

